]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
backgroundApps: Allow activating apps
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 19 May 2023 17:02:08 +0000 (19:02 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 6 Jun 2023 17:16:32 +0000 (17:16 +0000)
Now that we track apps instead of instances, we can make the menu
items activatable, because the corresponding action is no longer
app specific (like activating a particular tab): We can simply
activate the app, which hopefully will bring it to the foreground
again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2790>

js/ui/status/backgroundApps.js

index 6fd22ea1e1dbfde82a892f70f657591327245172..f2bee88845cc59505b3c9aa6a560e87b53956b8e 100644 (file)
@@ -34,8 +34,6 @@ var BackgroundAppMenuItem = GObject.registerClass({
         delete params.message;
 
         super._init(app.get_name(), app.get_icon(), {
-            activate: false,
-            reactive: false,
             ...params,
         });
 
@@ -93,6 +91,8 @@ var BackgroundAppMenuItem = GObject.registerClass({
 
         closeButton.connect('clicked', () => this._quitApp().catch(logError));
 
+        this.connect('activate', () => this.app.activate());
+
         this.connect('destroy', () => this._onDestroy());
     }